Skip to content

Deploy with Workers Builds using void deploy --platform cloudflare - #1045

Draft
TheAlexLichter wants to merge 28 commits into
mainfrom
feat/workers-builds-support
Draft

TheAlexLichter wants to merge 28 commits into
mainfrom
feat/workers-builds-support

Conversation

@TheAlexLichter

Copy link
Copy Markdown
Member

Summary

With this PR, a Void app can now deploy from Workers Builds (Cloudflare's GitHub/GitLab integration). The only setting to change is the deploy command (but we can send a PR to detect that internally I guess!):

Setting Value
Build command (empty)
Deploy command npx void deploy --platform cloudflare

Void detects Workers Builds and runs without prompts. It checks that it is deploying the Worker the build is connected to, and checks the token before building. It then reports the deployed version back, so the build page links to it.

Notes

  • Output file written by the parent: Only the trusted Void parent writes the output file. The alternative was to pass the variable to the final cf publish call only. That would put the path in a process Void doesn't control, and cf would report the name-override state itself. Writing from the parent keeps the scrubbing intact and lets Void set worker_tag from its own confirmed check.
  • Mismatched name is an error, not adoption: Adopting the Builds Worker name silently would deploy a different Worker than void.config.ts describes. Deploying a second Worker from one build would create versions Builds can't link to the build.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

Cloudflare builds and deploys previews for this pull request. Learn more about Cloudflare previews.

Worker Status Deployment Commit
void-cloud Deployed Preview f435a95

Updated: Dec 5, 2026, 18:55 UTC | Dashboard

@cpojer

cpojer commented Dec 5, 2026

Copy link
Copy Markdown
Member

I made some fixes, please feel free to take it back and polish until it's ready.

@TheAlexLichter

Copy link
Copy Markdown
Member Author

Note: splitting this up into two PRs (stacked) for easier review.
This will only cover basic workers build compat
The other PR will cover previews.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants